package com.king.config

import java.util.Properties

/**
 * @Author: KingWang
 * @Date: 2021/11/23  
 * @Desc:
 **/

case class DB(dbname:String,url:String,prop:Properties)
case class DBServer(hostname:String,port:Int, username:String,password:String)

object DBConfig {

  def mysql_test:DB = {
    val url = "jdbc:mysql://hadoop200:3306/test?characterEncoding=UTF-8&useSSL=false"
    val prop = new Properties()
    prop.setProperty("url",url)
    prop.setProperty("driver","com.mysql.jdbc.Driver")
    prop.setProperty("user","cdc_read")
    prop.setProperty("password","Cdc123!@#")
    DB("test",url,prop)
  }

  def mysql_gmall_flink(): DBServer ={
    DBServer("hadoop200",3306,"cdc_read","Cdc123!@#")
  }


}


